clear all
use replication_data, clear
	set more off
	cap drop occyear
	egen occyear=group(occsoc_num year)
	cap drop occstate
	egen occstate=group(occsoc_num statefip)
	cap drop stateyear
	egen stateyear=group(statefip year)
		
		global covars    "initialneed  avgageexp"
	
		capture drop avgageexp
		gen avgageexp=bdshare2000
		capture drop initialneed
		gen initialneed=initial_needbd_plus07
		

		reghdfe needbd_plus s_unemprate    $weight $restric  , vce(cluster statefip) a(occyear occstate)
		outreg2 s_unemprate using level_options2, replace
				
		reghdfe needbd_plus BGTsupdemrate_occsoc_broad    $weight $restric  , vce(cluster statefip) a(occyear occstate)
		outreg2 BGTsupdemrate_occsoc_broad using level_options2, append
		
		reghdfe needbd_plus s_unemprate  c.initialneed#c.year  c.avgageexp#c.year  $weight $restric  , vce(cluster statefip) a(occyear occstate)
		outreg2 s_unemprate using level_options2, append
				
		reghdfe needbd_plus BGTsupdemrate_occsoc_broad  c.initialneed#c.year  c.avgageexp#c.year  $weight $restric  , vce(cluster statefip) a(occyear occstate)
		outreg2 BGTsupdemrate_occsoc_broad using level_options2, append
		
			cap drop strend*
			tab statefip, g(strend)
			d strend*
			forv j=1/48 {
			replace strend`j'=strend`j'*year
			}
						
		reghdfe dneedbd_plus s_unemprate  stren* $weight $restric  , vce(robust) a(occyear occstate)
		outreg2 s_unemprate using level_options2, append
		
		reghdfe dneedbd_plus BGTsupdemrate_occsoc_broad  stren* $weight $restric  , vce(robust) a(occyear occstate)
		outreg2 BGTsupdemrate_occsoc_broad using level_options2, append

			
		capture drop avgageexp
		gen avgageexp=avgage2000
		capture drop initialneed
		gen initialneed=initial_need407

		
		
		reghdfe need4 s_unemprate    $weight $restric  , vce(cluster statefip) a(occyear occstate)
		outreg2 s_unemprate using level_options2, append
				
		reghdfe need4 BGTsupdemrate_occsoc_broad    $weight $restric  , vce(cluster statefip) a(occyear occstate)
		outreg2 BGTsupdemrate_occsoc_broad using level_options2, append
		
		reghdfe need4 s_unemprate  c.initialneed#c.year  c.avgageexp#c.year  $weight $restric  , vce(cluster statefip) a(occyear occstate)
		outreg2 s_unemprate using level_options2, append
				
		reghdfe need4 BGTsupdemrate_occsoc_broad  c.initialneed#c.year  c.avgageexp#c.year  $weight $restric  , vce(cluster statefip) a(occyear occstate)
		outreg2 BGTsupdemrate_occsoc_broad using level_options2, append
		
		reghdfe need4 du stren* $weight $restric  , vce(robust) a(occyear occstate)
		outreg2 s_unemprate using level_options2, append
		
		reghdfe need4 BGTsupdemrate_occsoc_broad  stren* $weight $restric  , vce(robust) a(occyear occstate)
		outreg2 BGTsupdemrate_occsoc_broad using level_options2, append excel		
	
		